package com.youlu.campus.web.pay;

import com.youlu.campus.service.pay.PayV3Service;
import com.yuelin.infrastructure.quantum.common.QResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

@RestController
public class PayController {

    @Autowired
    private PayV3Service payV3Service;


    @GetMapping("/public/pay/app")
    public QResult pay(){
        payV3Service.pay();
        return QResult.success(null);
    }
    @GetMapping("/public/pay/v3/notify")
    public Map<String, String> payNotify(HttpServletRequest request, HttpServletResponse response){
       return payV3Service.v3Notify(request,response);
    }
}
